Optimal. Leaf size=53 \[ \frac{B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{\sqrt{b}}-\frac{A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )}{\sqrt{a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0397549, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {844, 217, 206, 266, 63, 208} \[ \frac{B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{\sqrt{b}}-\frac{A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )}{\sqrt{a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 844
Rule 217
Rule 206
Rule 266
Rule 63
Rule 208
Rubi steps
\begin{align*} \int \frac{A+B x}{x \sqrt{a+b x^2}} \, dx &=A \int \frac{1}{x \sqrt{a+b x^2}} \, dx+B \int \frac{1}{\sqrt{a+b x^2}} \, dx\\ &=\frac{1}{2} A \operatorname{Subst}\left (\int \frac{1}{x \sqrt{a+b x}} \, dx,x,x^2\right )+B \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{x}{\sqrt{a+b x^2}}\right )\\ &=\frac{B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{\sqrt{b}}+\frac{A \operatorname{Subst}\left (\int \frac{1}{-\frac{a}{b}+\frac{x^2}{b}} \, dx,x,\sqrt{a+b x^2}\right )}{b}\\ &=\frac{B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{\sqrt{b}}-\frac{A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )}{\sqrt{a}}\\ \end{align*}
Mathematica [A] time = 0.0137493, size = 53, normalized size = 1. \[ \frac{B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{\sqrt{b}}-\frac{A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )}{\sqrt{a}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 52, normalized size = 1. \begin{align*}{B\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ){\frac{1}{\sqrt{b}}}}-{A\ln \left ({\frac{1}{x} \left ( 2\,a+2\,\sqrt{a}\sqrt{b{x}^{2}+a} \right ) } \right ){\frac{1}{\sqrt{a}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.5845, size = 683, normalized size = 12.89 \begin{align*} \left [\frac{B a \sqrt{b} \log \left (-2 \, b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{b} x - a\right ) + A \sqrt{a} b \log \left (-\frac{b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{a} + 2 \, a}{x^{2}}\right )}{2 \, a b}, -\frac{2 \, B a \sqrt{-b} \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) - A \sqrt{a} b \log \left (-\frac{b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{a} + 2 \, a}{x^{2}}\right )}{2 \, a b}, \frac{2 \, A \sqrt{-a} b \arctan \left (\frac{\sqrt{-a}}{\sqrt{b x^{2} + a}}\right ) + B a \sqrt{b} \log \left (-2 \, b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{b} x - a\right )}{2 \, a b}, -\frac{B a \sqrt{-b} \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) - A \sqrt{-a} b \arctan \left (\frac{\sqrt{-a}}{\sqrt{b x^{2} + a}}\right )}{a b}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.40735, size = 99, normalized size = 1.87 \begin{align*} - \frac{A \operatorname{asinh}{\left (\frac{\sqrt{a}}{\sqrt{b} x} \right )}}{\sqrt{a}} + B \left (\begin{cases} \frac{\sqrt{- \frac{a}{b}} \operatorname{asin}{\left (x \sqrt{- \frac{b}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge b < 0 \\\frac{\sqrt{\frac{a}{b}} \operatorname{asinh}{\left (x \sqrt{\frac{b}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge b > 0 \\\frac{\sqrt{- \frac{a}{b}} \operatorname{acosh}{\left (x \sqrt{- \frac{b}{a}} \right )}}{\sqrt{- a}} & \text{for}\: b > 0 \wedge a < 0 \end{cases}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.21745, size = 78, normalized size = 1.47 \begin{align*} \frac{2 \, A \arctan \left (-\frac{\sqrt{b} x - \sqrt{b x^{2} + a}}{\sqrt{-a}}\right )}{\sqrt{-a}} - \frac{B \log \left ({\left | -\sqrt{b} x + \sqrt{b x^{2} + a} \right |}\right )}{\sqrt{b}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]